<div class="main_content">
	<table width="98%" name="tab_main" id="tab_main" class="tab_main" border="0" cellpadding="0" cellspacing="1" align="left">
	<thead>
		<tr>
						<th width="5%">序号</th>
						<th width="20%">自购单号</th>
						<th width="10%">预算金额</th>
						<th width="10%">实际金额</th>
						<th width="10%">经办人</th>
						<th width="15%">经办日期</th>
						<!--<th>备注</th>-->
						<th width="15%">操作</th>
		</tr>
	</thead>
	<tbody>
	{%foreach from=$arr item=arr_item%}
		<tr class="list_{%$arr_item.materials_from_id%}">
				<td>
					{% if $materials_arr[$arr_item.materials_from_id] %}
						<div id="sign_{%$arr_item.materials_from_id%}" class="sign_pm pcursor sign_plus" onclick="showList(this,{%$arr_item.materials_from_id%})"></div>
					{% else %}
						<div class="sign_pm sign_minus"></div>
					{% /if %}
				</td>
				<td>{%$arr_item.materials_no%}</td>
				<td>{%$arr_item.budget_amount%}</td>
				<td>{%$arr_item.actual_amount%}</td>
				<td>{%$admin_info[$arr_item.admin_user_id]%}</td>
				<td>{%$arr_item.materials_time|date_format:"%Y-%m-%d"%}</td>
				<!--<td>{%$arr_item.materials_info%}</td>-->
				<td>
				<a href='index.php?c=zy_materials_from&m=browse&materials_from_id={%$arr_item.materials_from_id%}'>查看</a>&nbsp;&nbsp;
				<a href='index.php?c=zy_materials_from&m=edit&materials_from_id={%$arr_item.materials_from_id%}'>修改</a>&nbsp;&nbsp;
				<a href='index.php?c=zy_materials_from_list&m=add&materials_from_id={%$arr_item.materials_from_id%}'>添加详细</a>&nbsp;&nbsp;
				<a href='index.php?c=zy_materials_from&m=del&materials_from_id={%$arr_item.materials_from_id%}' onclick="return confirm('您确认删除吗？');">删除</a>
				
			</td>
		</tr>
		<tr class="hide_chunk">
			<td colspan="15">
				<div class="arrow_open"></div>
				
				<div class="load_list">
					<table width="96%" name="tab_sub" id="tab_sub" class="tab_sub" border="0" cellpadding="0" cellspacing="1" align="left">
						<thead>
							<tr>
								<th>物资名称</th>
								<th>规格型号</th>
								<th>单价</th>
								<th>数量</th>
								<th>总价</th>
								<th>单位</th>
								<th>付款方式</th>
								<th>所属项目</th>
								<th>合同号</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>	
							{% if $materials_arr[$arr_item.materials_from_id] %}
								{%foreach item=list from=$materials_arr[$arr_item.materials_from_id]%}
								<tr>
									<td>{%$list.materials_name%}</td>
									<td>{%$list.specification%}</td>
									<td>{%$list.price%}</td>
									<td>{%$list.number%}</td>
									<td>{%$list.price * $list.number%}</td>
									<td>{%$list.m_unit%}</td>
									<td>{%$pay_type_arr[$list.pay_type]%}</td>
									<td>{%$project_arr[$list.project_id]%}</td>
									<td>{%$list.contract_no%}</td>
									<td>
									<a href='index.php?c=zy_materials_from_list&m=browse&list_id={%$list.list_id%}'>查看</a>&nbsp;&nbsp;
									<a href='index.php?c=zy_materials_from_list&m=edit&list_id={%$list.list_id%}'>修改</a>&nbsp;&nbsp;
									<a href='index.php?c=zy_materials_from_list&m=del&list_id={%$list.list_id%}' onclick="return confirm('您确定要删除吗？');" >删除</a>&nbsp;&nbsp;
									</td>
								</tr>
								{%/foreach%}
							{%/if%}
						</tbody>										
					</table>
				</div>
			</td>
		</tr>	
	{%/foreach%}
	</tbody>
	{%if $arr_item %}
	<tfoot>
		<tr>
			<td colspan="7"><div id="pager">{%$page_footer%}</div></td>
		</tr>
	</tfoot>
	{%/if%}
	</table>
	
	<div class="btn_list">
		<span class="btn_add" onclick="location.href='?c=zy_materials_from&m=add'">添 加</span>
	</div>
</div>
